<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-href="main"><i class="fa fa-home"></i> 首页</a></li>
        <li class="active">门禁管理</li>
        <li class="active" ng-bind="title"></li>
    </ul>
</div>

<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>

<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content">
    <!-- 数据显示 -->
    <div class="wrapper-data">
        <div class="panel panel-default">
            <!-- 头部 -->
            <div class="panel-heading clearfix">
                <a ui-sref="main.doorSysManager.authManager.create" class="btn btn-info pull-right">
                    <i class="icon-user-follow m-r-sm text-md"></i>添加授权</a>
                <div class="w-lg">
                    <form ng-submit="search()" class="ng-pristine ng-valid">
                        <div class="input-group search-box">
                            <input type="text" class="form-control" ng-model="param.keyword" placeholder="身份证号、用户名、房屋">
                            <i ng-show="user.keyword" ng-click="clearSearch()" class="fa fa-times-circle text-muted search-clear"></i>
                            <span class="input-group-btn">
                                <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button>
                            </span>
                        </div>
                    </form>
                </div>
            </div>

            <!-- 数据表格 -->
            <div class="table-responsive">
                <table class="table table-striped b-t b-light text-center">
                    <thead>
                    <tr>
                    	<th>房屋地址</th>
                    	<th>姓名</th>
                    	<th>卡号</th>
<!--                     	<th>有效期</th> -->
                    	<th>卡类型</th>
                       	<th>门禁状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in pageInfo.data">
                        <td class="v-middle">{{item.buildingArea}}</td>
                        <td class="v-middle">{{item.personName}}</td>
                        <td class="v-middle">{{item.cardNo}}</td>
<!--                         <td class="v-middle">{{item.endTime}}</td> -->
                        <td class="v-middle">
                        	<span ng-show="item.cardType=='0'">身份证</span>
                        </td>
                        <td class="v-middle">
                            <span ng-show="item.status==1" class="text-danger">禁用</span>
                            <span ng-show="item.status==0" class="text-success">启用</span>
                        </td>
                        <td class="v-middle">
                        	<a href="#">详情</a>|
                        	<a href="#">续期</a>|
                        	<a ng-click="delAuth(item.cardNo)">销卡</a>
<!--                             <a ui-sref="main.doorSysManager.authManager.update({id: item.id})" class="btn btn-sm btn-default"> -->
<!--                                 <i class="fa fa-edit m-r-xs text-sm"></i>编辑</a> -->
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div><!-- /.table-responsive -->

            <!-- 底部分页 -->
			<span data-ng-include=" 'src/tpl/pageInfo.html' "></span>
        </div><!-- /.panel -->
    </div><!-- /.wrapper-data -->

</div><!-- /.wrapper-md -->
